home *** CD-ROM | disk | FTP | other *** search
- /* getmaxy */
- #include <stdio.h>
- #include <graphics.h>
-
- main()
- {
- int graphdriver = DETECT,graphmode;
- int i,maxy;
- char buffer[80];
-
- /* Initialize the graphics system */
- initgraph(&graphdriver,&graphmode,"c:\\turboc");
- outtextxy(10,20,"Demonstrating getmaxy");
-
- /* Get maximum y coordinate and show it */
- maxy = getmaxy();
- sprintf(buffer,"Maximum x coordinate is %d",maxy);
- outtextxy(10,60,buffer);
- /* Give user a chance to see the result */
- getch();
- closegraph();
- }